package cn.edu.zafu.bigdata.yt.yichangchuli;

public class AgeValidator_yt {
    public static void checkAge(int age) throws InvalidAgeException_yt {
        if (age < 18) {
            throw new InvalidAgeException_yt("Age must be 18 or older.");
        }
        System.out.println("Age is valid: " + age);
    }
}
